/*package kpi.java_training.testing.questions;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;

/**
 * User: Alex Palleev
 * Date: 04.11.13
 * Time: 16:22

public class ManyFromManyQuestionTest {
    private ManyFromManyQuestion question;
    private Field f;
    private int[] answers;

    @Before
    public void startParameters() {
        ArrayList<String> stringList = new ArrayList<String>();
        ArrayList<Integer> integerList = new ArrayList<Integer>();

        Collections.addAll(stringList, "first", "second", "third");
        Collections.addAll(integerList, 2, 3);

        question = new ManyFromManyQuestion("test question", stringList, integerList);
    }

    public void setAnswersValue() throws Exception {
        f = ManyFromManyQuestion.class.getDeclaredField("answers");
        f.setAccessible(true);
        answers = (int[]) f.get(question);
    }

    @Test
    public void testSetAnswerString2_4() throws Exception {
        question.setAnswer("2 4");
        setAnswersValue();
        Assert.assertArrayEquals(new int[]{2, 4}, answers);
    }

    @Test
    public void testSetAnswerString1() throws Exception {
        question.setAnswer("1");
        setAnswersValue();
        Assert.assertArrayEquals(new int[]{1}, answers);
    }

    @Test
    public void testSetAnswerString3_5_10_20_2() throws Exception {
        question.setAnswer("3 5 10 20 2");
        setAnswersValue();
        Assert.assertArrayEquals(new int[]{2, 3, 5, 10, 20}, answers);
    }


    @Test
    public void testIsCorrect() throws Exception {

    }
}       */
